<?php 
@header("Content-Type:text/html;charset=ust-8");
@include_once("conn.php");
@include_once("common.php");

$sql="select id,goodsName,goodsImg,goodsPrice from `goodslist`";
$result=mysqli_query($conn,$sql);
$obj=array();
if($result){
    $list=array();
    while($item=mysqli_fetch_assoc($result)){
        array_push($list,$item);
    }
    $obj["status"] = true;
    $obj["msg"] = "success";
    $obj["list"] = $list;
}else{
    $obj["status"] = false;
    $obj["msg"] = "sql语句有误";
    $obj["sql"] = $sql;
}
echo json_encode($obj);
?>